//
//  EpointMMIconCell.m
//  EpointFrame5
//
//  Created by 李亚春 on 14-1-8.
//  Copyright (c) 2014年 Epoint. All rights reserved.
//

#import "EpointMMIconCell.h"

@implementation EpointMMIconCell

- (id)initWithFrame:(CGRect)frame image:(NSString *)imageName title:(NSString *)title
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self.btIcon = [[UIImageView alloc]initWithFrame:CGRectNull];
        [self.btIcon setImage:[UIImage imageNamed:imageName]];
         self.lbTitle = [[UILabel alloc]initWithFrame:CGRectNull];
         self.lbTitle.text = title;
        [self.lbTitle setFont:[UIFont systemFontOfSize:12]];
        self.lbTitle.textAlignment = NSTextAlignmentCenter;
        [self addSubview: self.btIcon];
        [self addSubview:self.lbTitle];
    }
    return self;
}

-(void)layoutSubviews
{
    self.btIcon.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.width+20);
    self.lbTitle.frame = CGRectMake(0, 0, self.bounds.size.width, 20);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
